/**
 * 获取当天日期，yyyy-MM-dd
 * @return
 */
function getToday(){
	var d = new Date();
	var s = "";
	s += d.getFullYear() + "-";
	s += (d.getMonth() + 1) + "-";
	s += d.getDate();
					
	return s;
}

// 5条之内的新闻为最新
var news_days = 10;

/**
 * 
 * @param date
 * @return
 */
function isNew(thedate){
	var today = getToday();//"2010-08-24";
	
	today = today.replace(/-/g, "/"); 
	var thedate = thedate.replace(/-/g, "/"); 
	today = new Date(today);
	thedate = new Date(thedate);
	
	var times = today.getTime() - thedate.getTime(); 
	var days = parseInt(times / (1000 * 60 * 60 * 24));
	
	// alert("相差天数: " + days);
	if(days <= news_days){
		return true;
	}
	return false;
}